/*
 * Created by SharpDevelop.
 * User: MyWife
 * Date: 7/8/2010
 * Time: 9:44 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using System.Drawing;
using System.Windows.Forms;
using popLib;

namespace FileAssociateManager
{
	/// <summary>
	/// Description of InputDialog.
	/// </summary>
	public partial class InputDialog : Form
	{
		public InputDialog( string message )
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			label1.Text = message;
			textBox1.Text = "";
			ok.Click += delegate { 
				if( !StringLib.isValid(textBox1.Text) ) return;
				isOK = true; 
				this.Hide(); 
			};
			cancel.Click += delegate { this.Hide(); };
		}
		
		bool isOK = false;
		public bool IsOK { get{ return isOK; } }
				
		public string Content { get{ return textBox1.Text; } }
	}
}
